<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>{$title}</title>
<link href="__PUBLIC__/dwz/themes/css/login.css" rel="stylesheet" type="text/css" />
<script src="__PUBLIC__/js/jquery/jquery-1.7.2.min.js" type="text/javascript"></script>
</head>
<body>
	<div id="login">
		<div id="login_header">
			<div class="login_headerContent">
				<h2 class="login_title">用户登录</h2>
			</div>
		</div>
		<div id="login_content">
			<div class="loginForm">
				<form action="" id="loginform" onsubmit="return login();" method="post">
					<p>
						<label>用户名：</label>
						<input type="text" name="username" id="username" class="login_input" style="width:150px;height:16px;"/>
					</p>
					<p>
						<label>密<span style="margin-left:12px;font-size:14px;">码：</span></label>
						<input type="password" name="password" id="password" class="login_input" style="width:150px;height:16px;"/>
					</p>
					<div class="login_bar" id="login_bar">
						<input class="sub" type="submit" value=" " />
					</div>
					<div class="login_bar" id="loading" style="display:none;">
						<img src="__PUBLIC__/images/loading.gif" />
					</div>
				</form>
			</div>
			<div class="login_banner"><img src="__PUBLIC__/dwz/themes/default/images/login_banner.jpg" /></div>
			<div class="login_main">
				
				<div class="login_inner">
					<p><span style='margin-right:5px'>√</span> 逐步实现各个业务模块的系统化、全局化、规范化和高效化；</p>
					<p><span style='margin-right:5px'>√</span> 以业务为导向，以技术为支撑的系统辅助体系，帮助和不断完善现有的业务系统；</p>
					<p><span style='margin-right:5px'>√</span> 提升工作效率，为管理和市场决策提供科学有效的数据支持和辅助。使业务不断稳步向前发展。</p>
				</div>
			</div>
		</div>
	</div>
	<div id="login_footer" style="font-weight: bold;
    padding-top: 20px;">{$Think.config.COMPANY_NUM}</div>
	
<script type="text/javascript">
function login(){
	var username = $.trim($('#username').val());
	var password = $.trim($('#password').val());
	if(''==username){
		alert('请输入您的用户名!');
		$('#username').focus();
		return false;
	}
	if(''==password){
		alert('请输入您的密码!');
		$('#password').focus();
		return false;
	}
	$.ajax({
		url: '__APP__/Login/checkLogin/',
		type: 'POST',
		dataType: 'json',
		data: $('#loginform').serialize(),
		cache: false,
		beforeSend: function(){
			$('#loading').show();
			$('#login_bar').hide();
		},
		success: function(json){
			if(json.statusCode=='200'){
				location.href='__APP__/Index/';
			}else if(json.statusCode=='300'){
				$('#username').focus();
				alert(json.message);
			}
		},
		error:function(XMLHttpRequest, textStatus, errorThrown){
			alert('网络错误!');
		},
		complete:function(){
			$('#loading').hide();
			$('#login_bar').show();
		}
	});
	return false;
}
</script>
</body>
</html>